Dynomotion

Group: DynoMotion Message: 15397 From: engnerdan Date: 2/27/2018
Subject: Tapping Troubles
Attachments :
    I am stuck here, I used Morays code example for rigid tapping but its not working. I was hoping this would be easier than it seems to be. All the values are being passed, which I checked with the console.


    I have attached my test g-code, my C program, and there is a link to a YouTube Video of what my machine is actually doing.


    For spindle control I am using "DAC" on the tool setup screen.


    https://youtu.be/LSdGtYggldY

    What seems to be happening is the Z axis comes down to the retract plane height of Z0.150 and stops then waits a second, stops the spindle motor, retracts and goes to the next hole. It stops at Z0.150 hesitates and then retracts to complete the program. During this last retract it starts the spindle motor again.


    Thanks,
    Dan
    Group: DynoMotion Message: 15403 From: Tom Kerekes Date: 2/27/2018
    Subject: Re: Tapping Troubles
    Hi Dan,

    Did you configure the defines for your system?

    What is printed on the KMotion Console?

    Regards
    TK

    On 2/27/2018 11:35 AM, engnerdan@... [DynoMotion] wrote:
     

    I am stuck here, I used Morays code example for rigid tapping but its not working. I was hoping this would be easier than it seems to be. All the values are being passed, which I checked with the console.


    I have attached my test g-code, my C program, and there is a link to a YouTube Video of what my machine is actually doing.


    For spindle control I am using "DAC" on the tool setup screen.


    https://youtu.be/LSdGtYggldY

    What seems to be happening is the Z axis comes down to the retract plane height of Z0.150 and stops then waits a second, stops the spindle motor, retracts and goes to the next hole. It stops at Z0.150 hesitates and then retracts to complete the program. During this last retract it starts the spindle motor again.


    Thanks,
    Dan

    Group: DynoMotion Message: 15408 From: engnerdan Date: 3/1/2018
    Subject: Re: Tapping Troubles
    Attachments :
      Yes the #defines are all correct for my machine for the I/O bits, I have not touched MAXERROR, TAU, MAXSPEED, OSFACTOR, OSCONSTANT, STOPFACTOR.

      Here is the console output

      Bottom = -0.950000
      Retract = 0.150000
      Peck = 0.000000
      Pitch = 0.062500
      RPM = 250.000000
      Units = Inches
      Axis = 2
      AxisRes = 50800.000000
      Bottom = -0.950000
      Pitch = 0.062500
      Tap Complete. Minimium Depth Reached = 0.150000


      Bottom = -0.950000
      Retract = 0.150000
      Peck = 0.000000
      Pitch = 0.062500
      RPM = 250.000000
      Units = Inches
      Axis = 2
      AxisRes = 50800.000000
      Bottom = -0.950000
      Pitch = 0.062500
      Tap Complete. Minimium Depth Reached = 0.150000

      Attached is a PDF of my Tool Setup screens, and I have attached another copy of the C program that M119 runs.
      Group: DynoMotion Message: 15409 From: Tom Kerekes Date: 3/1/2018
      Subject: Re: Tapping Troubles
      The printout shows the depth reached = 0.15 (Retract)

      Which would be the case if Zmin = Z0 (never went below the starting point).

      Which would indicate the Tap cycle ended immediately.

      What is the state of your ESTOP input BIT 139?  If it were 0 it would cause an immediate exit.

      You might change the C Program to print a message if it exits in the case of detecting ESTOP. 

      Change:

      if (ESTOPSTATE == 0 && !ReadBit(ESTOP)) Done = 1;        // If e stop triggered, exit loop
      if (ESTOPSTATE == 1 && ReadBit(ESTOP)) Done = 1;        // If e stop triggered, exit loop

      to

      if (ReadBit(ESTOP) == ESTOPSTATE)  // If e stop triggered, exit loop
      {
          Done = 1;       
          printf("Tap Exit due to EStop\n");
      }

      Regards
      TK

      On 3/1/2018 7:55 AM, engnerdan@... [DynoMotion] wrote:
       

      Yes the #defines are all correct for my machine for the I/O bits, I have not touched MAXERROR, TAU, MAXSPEED, OSFACTOR, OSCONSTANT, STOPFACTOR.

      Here is the console output

      Bottom = -0.950000
      Retract = 0.150000
      Peck = 0.000000
      Pitch = 0.062500
      RPM = 250.000000
      Units = Inches
      Axis = 2
      AxisRes = 50800.000000
      Bottom = -0.950000
      Pitch = 0.062500
      Tap Complete. Minimium Depth Reached = 0.150000


      Bottom = -0.950000
      Retract = 0.150000
      Peck = 0.000000
      Pitch = 0.062500
      RPM = 250.000000
      Units = Inches
      Axis = 2
      AxisRes = 50800.000000
      Bottom = -0.950000
      Pitch = 0.062500
      Tap Complete. Minimium Depth Reached = 0.150000

      Attached is a PDF of my Tool Setup screens, and I have attached another copy of the C program that M119 runs.


      Group: DynoMotion Message: 15422 From: engnerdan Date: 3/7/2018
      Subject: Re: Tapping Troubles
      It was an E-Stop problem, at the moment I have my E-stop circuit working backwards from what it should be. So run is 0 and Stop is 1 and I missed the "!" in the rigid tapping code.

      Thank you very much for the help.

      I just need to test it out with a tap rigidly mounted in on some soft material (like wax). But with a floating tap holder its working well.

      Thanks again,
      Dan
      Group: DynoMotion Message: 15423 From: Tom Kerekes Date: 3/7/2018
      Subject: Re: Tapping Troubles
      Hi Dan,

      Good news and thanks for posting back.

      Regards
      TK

      On 3/7/2018 8:21 AM, engnerdan@... [DynoMotion] wrote:
       

      It was an E-Stop problem, at the moment I have my E-stop circuit working backwards from what it should be. So run is 0 and Stop is 1 and I missed the "!" in the rigid tapping code.

      Thank you very much for the help.

      I just need to test it out with a tap rigidly mounted in on some soft material (like wax). But with a floating tap holder its working well.

      Thanks again,
      Dan